﻿
using UnityEngine;
using System.Collections;
using System.Collections.Generic;


namespace GJXQGame
{
    [System.Serializable]
    public class SceneConfig : ScriptableObject
    {
        public bool Ready = false;

        [System.Serializable]
        public class SceneSetting
        {
            public string   Title;
            public SCENE_ID SceneID;
            public GUI_ID[] GUIID;

            public bool Contains(GUI_ID guiId)
            {
                foreach (GUI_ID id in GUIID)
                    if (id == guiId) return true;

                return false;
            }
        }

        public SceneSetting[] Setting;

        public SceneSetting this[SCENE_ID id]
        {
            get
            {
                // TODO XYS: optimise this
                for (int i = 0; i < Setting.Length; i ++)
                if (Setting[i].SceneID == id) return Setting[i];

                return Setting[(int)id];
            }
        }
    }
}
